const importAll = context => {
  const map = {};
  console.log(context);
  for (const key of context.keys()) {
    console.log(key);
    const keyArr = key.split("/");
    keyArr.shift(); // 移除.
    map[keyArr.join(".").replace(/\.vue$/g, "")] = context(key);
  }
  console.log(map);
  return map;
};

export default importAll;
